package com.demo;

public class OnJava2 {

	private int a =0;
	
	private OnJava2() {
		this.a++;
	};
	
	
	public static OnJava2 createOn2() {

		return new OnJava2();
	}
	
	public void f() {
		System.err.println("创建f");
	}
	
	
	public static void main(String[] args) {
		System.err.println(OnJava2.createOn2().a);
		System.err.println(OnJava2.createOn2().a);
		System.err.println(OnJava2.createOn2().a);
		System.err.println(OnJava2.createOn2().a);
		
	}
	
}
